JML Support for Primitive Arbitrary Precision Numeric Types: Definition and Semantics
نویسنده
چکیده
The Java Modeling Language, JML, is a notation for specifying and describing the detailed design and implementation of Java modules. It is a model-based specification language offering, in particular, method specification by preand post-condition, and class invariants to document required module behavior. It has recently been noted that the JML semantics of expressions over numeric types do not correspond to user expectations. As a result, an unusually high number of published JML specifications are invalid or inconsistent, including cases from the security critical area of smart card applications [Chalin03a]. In this extended abstract we briefly describe JML’s ancestry and language design principles (Section 2). This will help to explain the origin of the “semantic gap” between user expectations and the current meaning given to JML numeric expressions. With the objective of better matching user expectations, we introduce JMLa, a variant of JML supporting primitive arbitrary precision numeric types as well as implicit promotion to these types (Section 3). This is done in a manner that is consistent with JML’s language design goals and objectives [Chalin03a]. A preliminary formal semantics of JMLa expressions is given (Section 4) as well as an example of its application. Related and future work are described (Sections 5 and 6, respectively).
منابع مشابه
Improving JML: For a Safer and More Effective Language
An unusually high number of published JML specifications are invalid or inconsistent, including cases from the security critical area of smart card applications. We claim that these specification errors are due to a mismatch between user expectations and the current JML semantics of expressions over numeric types. At the heart of the problem is JML’s language design decision to assign to arithm...
متن کاملPreliminary Definition of Core JML
The JML specification language has evolved over a number of years and several variations/subsets have been formalized, mainly in the context of prototype systems for runtime and static verification. This document records the preliminary definition of basic semantic concepts for a core fragment of JML. It is intended to facilitate investigation of new features and improvement in interoperability...
متن کاملTowards Support for Non-null Types and Non-null-by- default in Java
This paper begins with a survey of current programming language support for non-null types and annotations, with a particular focus on extensions to Java. With the advent of Java 5 annotations, we note a marked increase in the availability of tools that can statically detect potential null dereferences. For such tools to be truly effective, they require that developers annotate declarations wit...
متن کاملFormal Semantics for the Java Modeling Language
A common critique of formal methods in software development practise is, that they are not readily understandable and thus not widely used (see for instance [Nam97]). The Java Modeling Language (JML) was created in an attempt to bridge that gap. By building upon the syntax of Java it is meant to be easily accessible to the common user – who might not be skilled in formal modeling. Due to this a...
متن کاملGrounding Bound Founded Answer Set Programs
Bound Founded Answer Set Programming (BFASP) is an extension of Answer Set Programming (ASP) that extends stable model semantics to numeric variables. While the theory of BFASP is defined on ground rules in practice BFASP programs are written as complex non-ground expressions. Flattening of BFASP is a technique used to simplify arbitrary expressions of the language to a small and well defined s...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Journal of Object Technology
دوره 3 شماره
صفحات -
تاریخ انتشار 2004